
public class Calculator {
  private int velocity;
  private boolean locked, egineOn;
  
  public Calculator() {
    this.velocity = 0;
    this.locked = false;
  }
  
  public void acelerate() throws Exception {
	  if (!this.egineOn)
		  throw new Exception();
	  velocity += 5;
  }
  
  public void startEngine() {
    if (this.locked)
      ;
  }
  
  public void close() {
    this.locked = true;
  }
  
  public void open() {
    this.locked = false;
  }
}
